package top.hzy520.common.util;

import org.apache.commons.lang.StringUtils;

import java.util.Random;

/**
 * @Author: HouZeYu
 * @Description: 生成随机数
 * @Date: Created in 21:04 2018/5/28
 */
public class RandomNumber {
     /**
     *@Author: HouZeYu
     *@Description:  生成4位短信验证码
     *@Date: 21:14 2018/5/28
     */
    public static String getRandomVerifyCode(){
        Random random=new Random();
         return StringUtils.substring(String.valueOf(random.nextInt()*10),2,6);
    }
}
